1. Field of the Invention
The present invention relates to a method for processing relational database management systems (RDBMS), and especially to a method for reserving pages of databases when there is insufficient free area in the databases.
2. Related Background Art
In database management systems, when inserting data in a table, an area for storage is allocated in a memory and data is stored. A plurality of data is stored in the area allocated, and when there are no more free areas in the area allocated, a new area is allocated in the memory and data is stored there. When data is deleted, the corresponding data in the area allocated is deleted and the part deleted becomes a free area. Generally, inserting, updating and/or deleting data repeatedly lower storage efficiency, which leads to deteriorating access performance. Consequently, reorganization of memory areas must be executed at appropriate times to reclaim free areas and reload data. In conventional reorganization, access to tables while they are being reorganized is prohibited, and databases are suspended at night or on non-business days for reorganization.
One way to restrain the lowering of storage efficiency is to preferentially use areas that have become free through deletions.
Examples of this involve a management system based on free space management table and a management system using free space cursor, which are described in Transaction Processing: Concepts and Techniques (ISBN 1-55860-190-2), pp 758–760, Jim Gray, Andreas Reuter 1993, Morgan Kaufman Publishers, Inc.
In the management system based on free space management table, an entry that stores the size of a free space of each storage area is created; and when securing a free space, an area that can be used for storage is searched by referring to the size of a free space of each storage area in the entry.
In the management system using free space cursor, a chain of free spaces and a point to a page in which data is currently inserted are retained; as long as data can be stored in the page currently being used, the data is stored in the page; and when the page is full, a free page is extracted from the chain of pages to use it as a current page in which data is to be inserted. When a page becomes free as a result of deletion, such page is added to the head of the chain of free pages.
However, in the method that stores the size of free space, the size of free space in each storage area must be checked in order to find an area that can be used for storage at each insertion processing. Also, the method that uses free space cursor requires an extra process (for example, a process to add an area that has become free by deletion) to be executed to perform storage management at each delete processing, which gives an extra burden to the delete processing.
Compared to these two systems, a system that allocates a new area on a storage device can perform an insertion processing at the highest speed, and does not give an extra burden to the delete processing.
There is an online reorganization function, in which reorganization takes place without having to prohibit access to tables. In this processing method, data in a first area to be reorganized is copied onto another area while the first area is reorganized, and the copy source and the copy destination are switched when copying is completed; however, a temporary area having a size equivalent to the area to be reorganized is required to make a copy.
With a rapid spread of the Web on a global scale, there are demands to provide database services 24 hours a day, 365 days a year. Consequently, there are increasing demands to reorganize without suspending service and to prevent the deterioration of storage efficiency and of access performance without reorganization.
In conventional technologies, the processing performance in insert and delete processes suffers to improve the storage efficiency, and the conventional technology also requires a temporary area to execute online reorganization.